<template>
	<view class="good-list">
		<view v-for="(item,index) in list" :key="index" class="item" @click="navigatorTo(item)">
			<view class="i-top">
				<view class="t1">
					<image class="image" :src="item.avatar"></image>
				</view>
				<view class="t2">
					<view style="font-size: 14px;">{{item.nickname}}</view>
					<view>{{item.created_at}}</view>
				</view>
			</view>
			<view class="i-bottom">
				{{item.title}}
			</view>
		</view>
	</view>
</template>

<script>
	let that
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		computed:{
			...mapGetters(['userInfo', 'api']),
			computImageUrl(){
				return (url)=>{
					let domain = url.split("/")
					domain = domain[0]+'//'+ domain[2]
					let finalUrl = url.replace(domain, "");
					let imageurl= getApp().globalData.AppConfig.cdnDomain + finalUrl
					return imageurl
				}
			}
		},
		props:{
			list: {
				type: [Array,Object],
				default(){
					return{}
				}
			},
		},
		data(){
			return{
			}
		},
		mounted() {
			that=this
		},
		methods:{
			navigatorTo(item){
				this.$emit("clickRow",true)
				uni.navigateTo({
					url: '/pages/communityDetails/communityDetails?&matchId='+item.id,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			},
			//收藏
			startFn(){
				
			}
		}
		
	}
</script>

<style lang="scss">
	.good-list{
		.item{
			padding: 5px 15px;color: #fff;font-size:12px;margin-top: 10px;border-radius: 10px;border-bottom:1px solid #242448;
			.i-top{
				display: flex;justify-content: space-between;
				.image{
					width: 60rpx;height:60rpx;border-radius: 50%;margin-right:20rpx;
				}
				.t2{
					flex: 1;
				}
				.t3{
					display: flex;align-items: flex-end;
				}
			}
			.i-bottom{
				font-size: 16px;line-height:20px;
			}
		}
	}
</style>
